<div id="main-content">
  <div class="container-fluid">
    <div class="row-fluid">
      <div class="span12">
        <div class="widget-block">
          <?php
          if($message == 'filed'){
          ?>
          <div class="alert alert-error fade in">
            <button data-dismiss="alert" class="close" type="button">×</button>
            <strong>Filed!</strong> Fail to save data.
          </div>
          <?php
          }
          if($message == 'sukses'){
          ?>
          <div class="alert alert-success fade in">
            <button data-dismiss="alert" class="close" type="button">×</button>
            <strong>Success!</strong> Now you have new Master Gudang.
          </div>
          <?php
          }
          ?>
          <div class="widget-head">
            <h5><?=$title_table?></h5>
            <div class="widget-control pull-right">
              <a href="#" data-toggle="dropdown" class="btn dropdown-toggle"><i class="icon-cog"></i><b class="caret"></b></a>
              <ul class="dropdown-menu">
                <li><a href="<?=  site_url("asset/add-management-outlet/".$outlet[0]->id_outlet) ?>"><i class="icon-plus"></i> Add New</a></li>
              </ul>
            </div>
          </div>
          <div class="widget-content">
            <div class="widget-box">
              <table class="data-tbl-boxy table">
                <thead>
                  <tr>
                    <th>Asset</th>
                    <th>Code</th>
                    <th>Tanggal</th>
                    <th>Option</th>
                  </tr>
                </thead>
                <tbody>
                  <?php
                  if(is_array($detail)){
                    $no = 1;
                    foreach ($detail as $key => $value) {
                      $link_log = site_url("asset/log-asset-outlet/".$value->id_asset_to_outlet);
                       $link_pengembalian_asset = site_url("asset/pengembalian_asset/".$value->id_asset_to_outlet);
                      $link_detail = site_url("asset/add-management-outlet/{$value->id_outlet}/".$value->id_asset_to_outlet);
                      $link_delete = site_url("asset/delete_management_outlet/{$value->id_outlet}/".$value->id_asset_to_outlet);
                     
                       print "
                  <tr>
                    <td>".$this->global_models->get_field("m_asset", "name", array("id_asset" => $value->id_asset))."</td>
                    <td>{$value->kode}</td>
                    <td>{$value->tanggal}</td>
                    <td>
                      <div class='btn-group'>
                        <button data-toggle='dropdown' class='btn btn-small dropdown-toggle'>Action<span class='caret'></span></button>
                        <ul class='dropdown-menu'>
                         <li><a href='{$link_pengembalian_asset}'>Pengembalian Asset</a></li>
                          <li><a href='{$link_log}'>Log</a></li>
                          <li><a href='{$link_detail}'>Edit</a></li>
                          <li><a href='{$link_delete}'>Delete</a></li>
                        </ul>
                      </div>
                    </td>
                  </tr>";
                          $no++;
                    }
                  }
                  ?>
                </tbody>
              </table>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>